import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: () => import(/* webpackChunkName: "about" */ '../views/index.vue')
  },
  {
    path: '/saleCar',
      name: 'saleCar',
    component: () => import(/* webpackChunkName: "about" */ '../views/SaleCar.vue')
  },
  {
    path: '/login',
      name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/LoginView.vue')
  },
  {
    path: '/register',
      name: 'register',
    component: () => import(/* webpackChunkName: "about" */ '../views/RegisterView.vue')
  },
  {
    path: '/partner',
    name: 'partner',
    component: () => import(/* webpackChunkName: "about" */ '../views/PartnerView.vue')
  },
  {
    path: '/order',
    name: 'order',
    component: () => import(/* webpackChunkName: "about" */ '../views/OrderAdd.vue')
  },
  {
    path: '/serviceGuarantee',
    name: 'serviceGuarantee',
    component: () => import('../views/ServiceGuarantee.vue')
  },
  {
    path: '/community',
    name: 'community',
    component: () => import('../views/Community.vue')
  },
  {
    path: '/forumIndex',
    name: 'forumIndex',
    component: () => import('../views/ForumIndex.vue')
  },
  {
    path: '/articleDetails',
    name: 'articleDetails',
    component: () => import('../views/ArticleDetails.vue')
  },
  {
    path: '/introduction',
    name: 'introduction',
    component: () => import('../views/Introduction.vue')
  },
  {
    path: '/searchResult',
    name: 'searchResult',
    component: () =>import('../views/searchResult.vue')
  },
  {
    path: '/articleResult',
    name: 'articleResult',
    component: () =>import('../views/ArticleResult')
  },
  {
    path: '/buyCar',
    name: 'buyCar',
    component: () => import('../views/BuyCar.vue')
  },
  {
    path: '/carReservation',
    name: 'carReservation',
    component: () => import('../views/CarReservation.vue')
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import('../views/detail.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
